package com.redis.sdk.cachecore;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Redis properties
 *
 * @description:
 * @author: cyj
 * @date 2020 -10-28 14:58:45
 */
@Component
@ConfigurationProperties(prefix = "cache")
@Data
public class CacheProperties {


    /**
     * 开启redis缓存
     */
    private Boolean openRedisCache = false;

    /**
     * 开启本地缓存
     */
    private Boolean openLocalCache = false;

    /**
     * redis缓存过期时间(s) 默认一天
     */
    private Integer redisCacheExpireTime = 60 * 60 * 24;

    /**
     * 本地缓存过期时间(s) 默认6小时
     */
    private Integer localCacheExpireTime = 60 * 60 * 6;
}
